const mongoose = require('mongoose')
const Schema = mongoose.Schema
const ObjectId = Schema.ObjectId
const commentSchema = new Schema({
    artid: {type: ObjectId,ref: 'Articles'},
    cateid:{type: Number,ref: 'Categorys'},
    img:{type:String},//头像
    replyName:{type:String},//回复者
    beReplyName:{type:String,default:'匿名'},
    content:{type:String},
    time:{type: Date, default: Date.now},
    address:{type:String},
    replyBody:{type:Array},
    isOK:{type:Boolean,default:true} 
})

module.exports = mongoose.model('Comment', commentSchema)